/**
 * This is a class representing a specific move for a tic-tac-toe
 * board.  
 * 
 * !!!!! DO NOT MODIFY THIS FILE !!!!!
 */

public class TTTMove
{
	private int row, col, player;
	
	/**
	 * Construct a move for the given player at the row and column
	 * specified.
	 * 
	 * @param row the row index of the move.
	 * @param col the column index of the move.
	 * @param player the player ID making the move.
	 */
	public TTTMove(int row, int col, int player)
	{
		this.row = row;
		this.col = col;
		this.player = player;
	}
	
	public int getRow()
	{
		return row;
	}
	
	public int getCol()
	{
		return col;
	}
	
	public int getPlayer()
	{
		return player;
	}
	
	public String toString()
	{
		return "(" + row + ", " + col + ")";
	}
	
	public boolean equals(TTTMove move)
	{
		return (getRow() == move.getRow())
			&& (getCol() == move.getCol())
			&& (getPlayer() == move.getPlayer());
	}
}
